<block name="header">
    <header>
        <notempty name="sliders">
            <style>
            </style>
            <div id="carousel-header" class="carousel slide" data-ride="carousel">
                <ol class="carousel-indicators">
                    <volist name="sliders" id="slider">
                        <li data-target="#carousel-header" data-slide-to="{$key}" <?php if($key == 0) echo 'class="active"';?>"></li>
                    </volist>
                </ol>
                <div class="carousel-inner" role="listbox">
                    <volist name="sliders" id="slider">
                        <div class="item <?php if($key == 0) echo "active";?>">
                            <a href="{$slider.url}"><img src="{$slider.cover_id|get_cover='path'}" style="width:100%;height:200px"></a>
                            <div class="carousel-caption">
                            </div>
                        </div>
                    </volist>
                </div>
                <a class="left carousel-control" href="#carousel-header" role="button" data-slide="prev">
                    <span class="glyphicon glyphicon-chevron-left" aria-hidden="true"></span>
                    <span class="sr-only">Previous</span>
                </a>
                <a class="right carousel-control" href="#carousel-header" role="button" data-slide="next">
                    <span class="glyphicon glyphicon-chevron-right" aria-hidden="true"></span>
                    <span class="sr-only">Next</span>
                </a>
            </div>
        <else />
            <div class="jumbotron header">
                <div class="container">
                    <h1 class="ellipsis">{:C('WEB_SITE_TITLE')}</h1>
                    <p class="ellipsis">
                        <span>{:C('WEB_SITE_SLOGAN')}</span>
                    </p>
                </div>
            </div>
        </notempty>
    </header>
</block>

<section class="container" role="main">
    <div class="row">
        <block name="side-left"></block>
        <block name="body"></block>
        <block name="side">
            <div class="col-xs-12 col-sm-3">
                <div class="side">
                    <block name="sidebutton"></block>
                    <div class="panel panel-outline">
                        <div class="panel-heading">
                            <h3 class="panel-title">栏目分类</h3>
                        </div>
                        <div class="panel-body">
                            <block name="category">
                                <ul class="nav">
                                    <article:cate name="cate" id="$current_category['id']">
                                        <li>
                                            <a <?php if($current_category['id'] == $cate['id']) echo 'class="active"';?> href="{:U('Article/lists/category/'.$cate['name'])}">
                                                <span class="{$cate.fonticon}"></span>{$cate.title}
                                            </a>
                                            <?php if($cate['_']): ?>
                                                <ul class="nav sub">
                                                    <?php foreach($cate['_'] as $k=>$v): ?>
                                                        <li><a <?php if($current_category == $v['id']) echo 'class="active"';?> href="{:U('Article/lists/category/'.$v['name'])}"><span class="{$v.fonticon}"></span>{$v.title}</a></li>
                                                    <?php endforeach; ?>
                                                </ul>
                                            <?php endif;?>
                                        </li>
                                    </article:cate>
                                </ul>
                            </block>
                        </div>
                    </div>
                    <div class="panel panel-outline">
                        <div class="panel-heading">
                            <h3 class="panel-title">最热</h3>
                        </div>
                        <div class="panel-body">
                            <ul class="nav">
                                <article:list name="article" row="5" pos="2">
                                    <li><a class="ellipsis" href="{:U('Article/detail?id='.$article['id'])}" title="{$article.title}" style="color:{$article.title_color};"><span class="hot-no hot{$i}">{$i}</span>{$article.title}</a></li>
                                </article:list>
                            </ul>
                        </div>
                    </div>
                </div>
            </div>
        </block>
    </div>
</section>
